package renda.dao.serivce.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import renda.dao.AdminDAO;
import renda.dao.serivce.AdminService;
import renda.pojo.Admins;
import renda.pojo.Topics;
import renda.pojo.Users;

@Service("adminService")
@Transactional
public class AdminServiceImpl implements AdminService{
	@Resource(name="adminDao")
	private AdminDAO adminDao;
	
	public void setAdminDao(AdminDAO adminDao) {
		this.adminDao = adminDao;
	}
	
	public Admins login(Admins admin) {
		Admins admin1 = adminDao.get(admin);
		return admin1;
	}

	public List<Users> getUsers(Users user) {
		return adminDao.getUsers(user);
	}

	public List<Topics> getTopics(int page, int size) {
		return adminDao.getTopics(page,size);
	}
}
